package sk.fhi.client.event;

import sk.fhi.shared.model.AbstractEntity;

import com.google.gwt.event.shared.GwtEvent;

public class OpenEvent extends GwtEvent<OpenEventHandler> {
	public static Type<OpenEventHandler> TYPE = new Type<OpenEventHandler>();
	
	final AbstractEntity entity;
	
	public OpenEvent(AbstractEntity entity) {
		super();
		this.entity = entity;
	}

	@Override
	public Type<OpenEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(OpenEventHandler paramH) {
		paramH.onOpen(this);
	}
	
	public AbstractEntity getEntity() {
		return entity;
	}

}
